package ar.republicagroup.gestion.services.impl;

import ar.republicagroup.gestion.dao.DepositoDAO;
import ar.republicagroup.gestion.entities.Cliente;
import ar.republicagroup.gestion.entities.Deposito;
import ar.republicagroup.gestion.services.DepositoServices;
import java.util.Date;
import java.util.List;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author DIEGOALV
 */
public class DepositoServicesImpl implements DepositoServices {

    private DepositoDAO depositoDao;
    private double comisionDeposito;
    private double totalMontoDepositos;
    
 
    public void setDepositoDao(DepositoDAO depositoDao) {
        this.depositoDao = depositoDao;
    }
        
    
    @Override
    public List<Deposito> findEntities() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String insert(Deposito beanDeposito) {
        return depositoDao.insert(beanDeposito);
    }

    @Override
    public String update(Deposito beanDeposito) {
       return depositoDao.update(beanDeposito);
    }

    @Override
    public Deposito get(Integer idDeposito) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String delete(Integer idDeposito) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public DefaultComboBoxModel combo() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    @Override
    public List<Deposito> getDepositosByFilters(Cliente cliente, Date fechaDesde, Date fechaHasta, int radioButtonOption) {
        return depositoDao.getDepositosByFilters(cliente, fechaDesde, fechaHasta, radioButtonOption);
    }

    @Override
    public void setComisionDeposito(double comisionDeposito) {
        this.comisionDeposito   = comisionDeposito;
    }

    @Override
    public void setTotalMontoDepositos(double totalMontoDepositos) {
        this.totalMontoDepositos = totalMontoDepositos;
    }

    @Override
    public double getSubtotalLiquidacion() {
        
        return totalMontoDepositos - (totalMontoDepositos * (comisionDeposito/100));
        
    }
    

   
    
    
    
}
